package com.console.operations.planmgr;

import com.common.test.OperationBase;
import com.common.test.UITestBase;
import com.console.pages.planmgr.AdvanceRepayPage;

/**
 * Created by Sylar on 2016/8/11.
 */
public class AdvanceRepay extends OperationBase {
    public AdvanceRepay(UITestBase tb) {
        super(tb);
    }
    public void advanceRepay() throws Exception{
        switchToDefaultContent();
        AdvanceRepayPage advanceRepayPage= new AdvanceRepayPage(tb);
        advanceRepayPage.advanceRepayLink.click();
        //剩余本金
        advanceRepayPage.reduceAmount.type("0");
        advanceRepayPage.reduceAccountType.selectOptionByText("风险基金");
        //利息
        advanceRepayPage.interestValue.type("0");
        //咨询费
        advanceRepayPage.consultFlag.selectOptionByText("退还");
        advanceRepayPage.consultValue.type("0");
        //评估费
        advanceRepayPage.auditFlag.selectOptionByText("退还");
        advanceRepayPage.auditValue.type("0");
        //管理费
        advanceRepayPage.serviceFlag.selectOptionByText("退还");
        advanceRepayPage.serviceValue.type("0");
        //风险基金
        advanceRepayPage.assetFlag.selectOptionByText("退还");
        advanceRepayPage.assetValue.type("0");
        //手续费
        advanceRepayPage.handlingFlag.selectOptionByText("退还");
        advanceRepayPage.handlingValue.type("0");
        //提前还款保障金
        advanceRepayPage.advanceProtectionFlag.selectOptionByText("退还");
        advanceRepayPage.advanceProtectionValue.type("0");
        //手工还款抵扣
        advanceRepayPage.handRepayFlag.selectOptionByText("退还");
        advanceRepayPage.handRepayValue.type("0");
        //结清类型
        advanceRepayPage.advanceSettle.selectOptionByText("提前结清");
        //结清按钮
        advanceRepayPage.advanceRepayBtn.click();
    }
}
